<?php
include(TPL.'head.html');
?>
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title">删帖测试</h3>
	</div>
	<div class="panel-body">
		<table class="table"><tr><td>输入贴吧名称：</td><td><input type="text" class="form-control" id="tieba"></td><td><input type="button" id="submit" class="btn btn-primary" value="测试"></td></tr></table>
		<div class="alert alert-info">
			<h3>结果</h3>
			<div id="info"></div>
		</div>
	</div>
</div>
<?php
$footerjs='$("#submit").click(function(){var tieba=$("#tieba").val(),me=window.location.href;$(this).attr("disabled","true");$("#info").html("正在获取违规贴子");$.ajax({"url":me,"type":"post","data":{"tieba":tieba},"success":function(data){var deltie=[];eval(data);$("#info").html("<p>正在删除违规贴子（总计"+deltie.length+\'个）</p><p id="tienow"></p>\');var leng=deltie.length-1;$(".alert").append(\'<ul id="result" class="list-group"></ul>\');for(var i=0;i<=leng;i++){$("#tienow").html("当前贴子："+deltie[i]);$.ajax({"url":me,"type":"post","data":{"tieba":tieba,"tid":deltie[i]},"async":false,"success":function(oneresult){$("#result").append(oneresult)}})}$("#info").html("所有贴子已删除");$("#submit").removeAttr("disabled")}})});';
include(TPL.'footer.html');
?>